﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BiomedicaLib.NUI.Synthasis
{
    public class SpeechSynthasisiser
    {
        
        Microsoft.Speech.Synthesis.SpeechSynthesizer synth = new Microsoft.Speech.Synthesis.SpeechSynthesizer();
        public SpeechSynthasisiser()
        {
            synth.Volume = 100;
            synth.Rate = -1;

            synth.SetOutputToDefaultAudioDevice();
           
        }
        public void Run(String txt)
        {
           
          

            
                synth.SpeakAsync(txt.ToLowerInvariant());
             

        }
        public void Say(String txt)
        {
            synth.SpeakAsync(txt);
        }

        public static void Speek(String txt)
        {
            SpeechSynthasisiser s = new SpeechSynthasisiser();
            s.Say(txt);
        }
    }
}
